#pragma once

#include <iostream>
#include <signal.h>

#include <opencv2/opencv.hpp>


class VirtualCamera {

public:
    VirtualCamera(std::string video_path); 
    ~VirtualCamera(); 

    int open();
    int close();
    cv::Mat getFrame();

private:
    std::set<std::string> picture_type = {"jpg", "jpeg", "png"};
    std::string video_path;
    bool is_picture; // true表示要打开图片
    cv::VideoCapture cam;
    bool is_opened;
};
